package com.owc.service.app;

import com.github.pagehelper.PageInfo;
import com.owc.common.lock.ULock;
import com.owc.domain.PageBean;
import com.owc.domain.dto.ExchangeBaseDTO;
import com.owc.domain.dto.admin.ExchangeOrderDTO;
import com.owc.domain.dto.admin.RateConfigDTO;
import com.owc.domain.dto.admin.SystemConfigDTO;
import com.owc.domain.entity.Exchange;
import com.owc.domain.vo.admin.ExchangeQueryVo;
import com.owc.domain.vo.app.ExchangeVo;

import java.util.List;

/**
 * @Author xiaom
 * @Date 2020/2/27 14:11
 * @Version 1.0.0
 * @Description <>
 **/
public interface ExchangeService {
    /**
     * 获取兑换汇率配置
     */
    List<RateConfigDTO> getRateConfig();

    /**
     * 兑换
     * @param exchangeVo 兑换参数
     */
    Boolean exchange(ExchangeVo exchangeVo) throws Exception;

    /**
     * 获取兑换历史记录
     */
    PageBean<ExchangeBaseDTO> getExchangeRecord(Integer pageIndex, Integer pageSize);

    /**
     * 获取系统所有兑换订单
     */
    PageInfo<Exchange> getExchangeOrderList(ExchangeQueryVo queryVo);
}
